﻿<project name="StockholmsStad.Web.UI" default="Info">
  <include buildfile="Properties.Include" />

  <target name="Run">
    <call target="Info" />
    <call target="CopyConfigurationFiles" />
    <call target="Build" />
    <call target="CopyToDeployFolder" />
    <call target="ZipFiles" />
  </target>

  <target name="Info">
    <echo message="${ProjectName} buildfile..." />
  </target>

  <target name="CopyConfigurationFiles">
    <copy todir="${ProjectFolder}\" overwrite="true">
      <fileset basedir="${Global.ConfigFolder}\${ProjectName}\" >
        <include name="**/*.config" />
      </fileset>
    </copy>
  </target>

  <target name="Build">
    <msbuild project="${ProjectFolder}\${ProjectName}.sln">
      <arg value="/p:Configuration=${Configuration}" />
      <arg value="/v:m" />
    </msbuild>
  </target>

  <target name="CopyToDeployFolder">
    <nant buildfile="${Global.CoreTargetsBuildFile}" target="Core.CopyWebbToDeployFolder" inheritall="true">
      <properties>
        <property name="Project.DeployFolder" value="${Global.WebbFolder}" />
        <property name="Project.ProjectFolder" value="${ProjectFolder}" />
        <property name="Project.ProjectName" value="ParvisWebb" />
      </properties>
    </nant>
  </target>

  <target name="ZipFiles">
    <nant buildfile="${Global.CoreTargetsBuildFile}" target="Core.ZipFilesToDeployFolder" inheritall="true">
      <properties>
        <property name="Project.ProjectName" value="ParvisWebb" />
        <property name="Project.FileName" value="ParvisWebb.zip" />
      </properties>
    </nant>
  </target>

</project>